package com.panshi.api.util;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author XiaoWangYa
 * @version 1.0
 * @date 2020/8/4 0004 下午 2:50
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("分页实体类")
public class PageSizeVO<T> implements Serializable {
    @ApiModelProperty("业务Id")
    private int aid;
    @ApiModelProperty("类型Id")
    private int tid;
    @ApiModelProperty("用户Id")
    private int uid;
    @ApiModelProperty("起始页")
    private int startIndex;
    @ApiModelProperty("分页大小")
    private int pageSize;
    @ApiModelProperty("总数量")
    private int count;
    @ApiModelProperty("状态")
    private String state;
    @ApiModelProperty("评论父级Id")
    private int parentid;
    @ApiModelProperty("评论回复层级")
    private int depth;

    private T data;//数据

    public int getStartIndexInfo () {
        return (startIndex - 1) * pageSize;
    }

}
